<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        <title>预览</title>
        <#include "/pubHeadStyle.html">
    </head>
    <body>
<form class="layui-form" lay-filter="formData" id="formData" style="height: 411px;overflow-y: auto;">
    <div class="layui-btn-container" style="position: absolute;bottom: 0;left:46%">
        <a class="layui-btn layui-btn-danger" id="close">关闭</a>
    </div>
    <div class="assistDiv" style="padding-top:8px;">
        <div class="layui-form-item">
            <label class="layui-form-label">POST参数:</label>
            <div class="layui-input-block" style="width: 70%;margin-left:114px;">
                <textarea style="resize:none" readonly cols="75" rows="4">引入CommonDialog.js：<script type="text/javascript" src="${r'${ctx}'}/formStatic/form/CommonDialog.js"></script>
                </textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">调用的方法:</label>
            <div class="layui-input-block" style="width: 70%;margin-left:114px;">
                <textarea  style="resize:none" readonly cols="75" rows="4">构造需要向自定义对话框传递的参数键值对字符串：var paramValueString = "参数名=参数值";</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">回调方法:</label>
            <div class="layui-input-block" style="width: 70%;margin-left:114px;">
                <textarea style="resize:none" readonly cols="75"
                          rows="4">调用CommonDialog，传入对话框别名，编写回调函数，根据需要传入paramValueString参数；</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">其他说明:</label>
            <div class="layui-input-block" style="width: 70%;margin-left:114px;">
                <textarea name=""  style="resize:none" readonly cols="75" rows="8">
                    <script type="text/javascript" src="${r'${ctx}'}//formStatic/form/CommonDialog.js"></script>
                    <script type="text/javascript">
                            CommonDialog(alias,  function (data,selectIds) {
                                var dataObj = JSON.parse(data);
                                //对象赋值
                                $(obj).val(dataObj.XX);
                                //对象前面一个追加一个元素 并赋值selectIds
                                $(obj).before("<input type='hidden' name='selectIds'>");
                                $("input[name=selectIds]").val(selectIds);
                            }, paramValueString);
                            //如果是组合对话框，请调用CommonCombinationDialog
                            CommonCombinationDialog(alias,  function (data,selectIds) {
                                var dataObj = JSON.parse(data);
                                //对象赋值
                                $(obj).val(dataObj.XX);
                                //对象前面一个追加一个元素 并赋值selectIds
                                $(obj).before("<input type='hidden' name='selectIds'>");
                                $("input[name=selectIds]").val(selectIds);
                            }, paramValueString);
                    </script>
                </textarea>
            </div>
        </div>
    </div>
</form>
<script>
    layui.config({
        base: serverPath.formPath + staticPath.formPath //静态资源所在路径
    }).extend({
        index: 'index' //主入口模块
    }).use(['index', 'commons','jquery', 'layer', 'table','setter'], function () {
        var $=layui.jquery;
        $("#close").on('click', function () {
            parent.layer.close(parent.layer.getFrameIndex(window.name))
        });
    })
</script>
    </body>
</html>